#ifndef RTX_QUEUE_H
#define RTX_QUEUE_H

/*
Interface file for the queue
Implemented as a linked list
*/

typedef int queueItem; 

struct QueueNode
{
	struct QueueNode* next;
	struct QueueNode* previous;
	queueItem value;
}
typedef struct
{
	int count; // queue length (number of items in queue)
	struct QueueNode* front; // pointer to item in front of queue (next to be dequeued)
	struct QueueNode* rear;  // pointer to item in back of queue (most recently enqueued)
} Queue;

void queue_initialize(Queue* queue);

int queue_isEmpty(Queue* queue);

int queue_length(Queue* queue);

int queue_enqueue(Queue* queue, queueItem value);

queueItem queue_dequeue(Queue* queue);

int queue_remove(Queue* queue, queueItem value);

void queue_destroy(Queue* queue);

#endif
